<html xmlns:th="http://www.thymeleaf.org">
<div class="bjui-pageHeader" style="background-color:#fefefe; border-bottom:none;">
    <form data-toggle="ajaxsearch"
          data-options="{searchDatagrid:$.CurrentNavtab.find('#datagrid-businessUsePhone-filter')}">
        <div class="bjui-searchBar">
            <label>号码：</label>
            <input type="text" name="phone" class="form-control" size="15">

            <label class="row-label">分组名</label>
            <input type="text" name="groupName" class="form-control" size="15">


            <label>状态</label>
            <select name="state" data-toggle="selectpicker" id="select_usephone_state">
            </select>

            <button type="submit" class="btn-green" data-icon="search">搜索</button>
            <button type="reset" class="btn-orange" data-icon="times" onclick="resetAll();">重置</button>

            <div class="bjui-moreSearch" style="top: 27px; display: none;">
            </div>
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown"
                            data-icon="reply-all" style="width: 150px;">
                        批量操作
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu right" role="menu">
                        <li><a href="javascript:void(0);" onclick="initImp('impBusinessUsePhoneForm','/admin/usephone/initimp');" >批量导入</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent">
    <table class="table table-bordered" id="datagrid-businessUsePhone-filter" data-toggle="datagrid" data-options="{
        height: '100%',
        showToolbar: true,
        toolbarItem: 'refresh,|,add,edit,del',
        dataUrl: '/admin/usephone',
        dataType: 'json',
        jsonPrefix: '',
        editMode: {dialog:{width:'800',height:400,title:'编辑信息',mask:true}},
        editUrl: '/admin/usephone/initpage?req_id={id}',
        delUrl:'/admin/usephone/del',
        delPK:'id',
        delConfirm:true,
        showCheckboxcol: true,
        inlineEditMult:false,
        paging: {pageSize:20},
        linenumberAll: true,
        filterThead:false,
        hScrollbar:false
    }">
        <thead>
        <tr>
            <th data-options="{name:'businessGroup',align:'center',width:200,render:showBusinessGroup}">分组</th>
            <th data-options="{name:'phone',align:'center',width:400}">号码</th>
            <th data-options="{name:'state',align:'center',width:150}">状态</th>
            <th data-options="{name:'remark',align:'center',width:200}">备注</th>
            <th data-options="{name:'updatedTime',align:'center',width:300}">更新时间</th>
        </tr>
        </thead>
    </table>
</div>
<script type="text/javascript">
    select_option('select_usephone_state', 'com.imessage.type.BaseState');
    function showBusinessGroup(value){
        if(value){
            return value.name;
        }
        return "";
    }
</script>
